<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!--<link rel="stylesheet" type="text/css" href="css/jquery/jquery-ui-1.8.23.custom.css" />-->
        <link rel="stylesheet" type="text/css" href="css/jquery/easyui.css" />
        <link rel="stylesheet" type="text/css" href="css/jquery/icon.css" />
         <link rel="stylesheet" type="text/css" href="css/backend/module.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />


        <!--[if lt IE 8]>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
        <![endif]-->

     <!--<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />-->
        <script type="text/javascript" src="js/jquery/jquery-1.8.0.min.js"></script>
    <!-- <script type="text/javascript" src="js/jquery/jquery-ui-1.8.23.custom.min.js"></script>-->
        <script type="text/javascript" src="js/jquery/jquery.easyui.min.js"></script>
        <script type="text/javascript" src="js/common.js"></script>
		<title> 推广800 </title>
		<style type="text/css">
            html,body
            {
                margin:0px;
                height:100%;
            }
            .easyui-layout
            {
                width:100%;
                height:100%;
            }
			.btn
			{
				padding: 5px;
				cursor: pointer;
			}
            #iframe
            {
                width:100%;
                height:100%
            }

		</style>
        <script>
        $(document).ready(function() {
            	setCurrentDate();
				setCurrentTime();

                $('#welcome').on('click',function() {
                    $('#iframe').attr('src','backend.php?r=site/welcome');
                });

                $('#logout').on('click',function() {
                    window.location = 'backend.php?r=site/logout';
                });
                $('#about').on('click',function() {
                    $('#about_dialog').dialog({
                        title:'关于推广800',
                        modal:true,
                        width:500,
                        height:300,
                        closed: false
                    });
                    $('#about_dialog').css('display','block');
                });
                $('#updatepass').on('click',function() {
                    $('#change_password').dialog({
                        title:'修改密码',
                        modal:true,
                        minimizable:false,
                        maximizable:false,
                        collapsible:false,
                        width:300,
                        height:200,
                        buttons :[
                        {
                            iconCls:'icon-save',
                            text:'保存',
                            handler:function() {
                                var url = 'backend.php?r=admin/changePwd';
                                $('#passwordForm').form('submit',{
                                    url:url,
                                    success:function(data) {
                                        var data = eval("data =" +data);
                                        if (data.success)
                                        {
                                            $.messager.alert('系统提示','操作成功','info');
                                            $('#change_password').dialog('close');
                                        }
                                        else
                                        {
                                            $.messager.alert('系统提示',data.msg,'error');
                                        }

                                    }
                                });
                            }
                            
                        },{
                            text:'取消',
                            iconCls:'icon-cancel',
                            handler:function(){
                                $('#change_password').dialog('close');
                            }
                        }    
                        ]

                    })
                })

        });
        </script>
	</head>

	<body>
    <div class="easyui-layout">
        <div data-options="region:'north'" style="height:70px">
        	<img style="margin-left: 5px;margin-top:7px;width:320px;height:60px;" src="images/backend/logo.png" alt="推广800"   />
			<div style="float:right; margin-top: 10px; margin-right: 6px;color:rgb(102,102,102);text-align:right;">
				<span style="padding:5px;color:rgb(42,100,166);font-weight:bold;">
				<?php echo Yii::app()->user->name; ?></span> |
				<span class="btn" id='updatepass'>修改密码</span> |
				<span id="logout" class="btn">注销</span> |
				<span id="welcome" class="btn">首页</span> |
				<span id="about" class="btn">关于</span>
				<div style="display:block">&nbsp;</div>
				<span id="currentDate"></span><span id="currentTime"></span>
				<span>&nbsp;</span>
            </div>
        </div>
        <div data-options="region:'west',split:true" title="功能模块" style="width:200px;">
            <ul class="easyui-tree" data-options="url:'backend.php?r=module/list',	onClick: function(node){
				$('#iframe').attr('src',node.attributes);

			}">

            </ul>
        </div>
        <div data-options="region:'center'">

        <iframe id='iframe' src='backend.php?r=site/welcome'></iframe>
        </div>
    </div>
    <div id="changePassword" closed='true' class='easyui-dialog'>
<center>
<div id='error_password' style='color:red'></div>
<div class="demo-info">
	</div>
    <div ></div>
	<div id='change_password' style="background:#fafafa;padding:10px;width:400px;height:300px;">
	    <form id="passwordForm" method="post" novalidate action="backend.php?r=site/ChangePassword">
	        <div>
	           旧密码:
	             　　<input class="easyui-validatebox" type="password" id="old_password" data-options="required:true" validType="length[3,18]"  invalidMessage="密码长度在3-18位之间" missingMessage="请输入旧密码" name='password' ></input>
	        </div>
	        <div>
	            新密码:
	             　　<input class="easyui-validatebox" id="password" type="password"  data-options="required:true" validType="length[6,18]" invalidMessage="密码长度在6-18位之间" missingMessage="请输入新密码" name='newPassword'></input>
	        </div>
	        <div>
	            重复新密码:
	            <input class="easyui-validatebox" id="repeat_password" type="password"  data-options="required:true" missingMessage="重复新密码" validType="equalTo['#password']"  invalidMessage="两次输入密码不匹配" name='repeatPassword'></input>
	        </div>
            <br>
<!--	        <div>
//	            <a href='#' class='easyui-linkbutton' onclick="mysubmit()">提交</a>
//                <a href='#' class='easyui-linkbutton' onclick='cleardata()'>清除</a>
//	        </div>-->
	    </form>
	</div>
    <center>
    </div>
    <div id ='about_dialog' class='easyui-dialog' data-options="closed:true">
        <div style="font-size:10pt;color:#a5a5a5;font-family:'hei'">
            <div style="margin:5px;">软件版本: <font face="Arial">1.1.0 - beta</font></div>
        </div>
    </div>
    </body>
</html>
